package com.ts.admin.modules.content;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ts.common.core.utils.Result;
import com.ts.feign.api.PostService;
import com.ts.feign.vo.PostVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 帖子
 *
 * @author admin admin@qq.com
 * @since 1.0.0 2023-02-22
 */
@RestController
@RequestMapping("/post")
@Api(tags="帖子")
public class PostController {
    @Autowired
    private PostService postService;

    @PostMapping("/list")
    public Result<PostVo> page(Page<PostVo> page){
        return new Result().ok(postService.list(page));

    }

}